# 类的成员方法
# 设计一个类
class Student:
    name = None
    sex = None
    age = None
    def say(self):
        print(f"你好，我叫{self.name}")
    def say1(self,msg):
        print(f"你好，我叫{self.name},{msg}")
    # 静态方法
    @staticmethod
    def hello():
        print("这是一个静态方法")
    # 类方法
    @classmethod
    def cm(cls):
        print("这是一个类方法")

student = Student()
student.name = "紫嫣"
student.say()
student.say1("今年22岁")
Student.hello()
Student.cm()

# 类的小练习
# 闹钟类
class Clock:
    # id
    id = None,
    # 价格
    price = None
    # 闹钟响
    def ring(self):
        import winsound
        # 系统内置的会发出声音
        winsound.Beep(2000,1000)

clock = Clock()
clock.ring()